package com.shopping.entity;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import jdk.nashorn.internal.ir.annotations.Ignore;

import java.io.Serializable;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author zhangybt
 * @since 2019-08-05
 */
@TableName("t_user")
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;

    /**
     * 用户昵称
     */
	@TableField("nick_name")
	private String nickName;
    /**
     * 用户电话
     */
	private String phone;
    /**
     * 用户真实姓名
     */
	@TableField("user_name")
	private String userName;
    /**
     * 用户邮箱
     */
	@TableField("user_email")
	private String userEmail;
    /**
     * 用户头像
     */
	@TableField("head_image")
	private String headImage;
    /**
     * 密码
     */
	private String password;
    /**
     * 用户状态 0:未删除 1:已删除
     */
	private Integer status;
	/**
	 * token
	 */
	@TableField(exist = false)
	private String token;


	public Long getId() {
		return id;
	}

	public User setId(Long id) {
		this.id = id;
		return this;
	}

	public String getNickName() {
		return nickName;
	}

	public User setNickName(String nickName) {
		this.nickName = nickName;
		return this;
	}

	public String getPhone() {
		return phone;
	}

	public User setPhone(String phone) {
		this.phone = phone;
		return this;
	}

	public String getUserName() {
		return userName;
	}

	public User setUserName(String userName) {
		this.userName = userName;
		return this;
	}

	public String getUserEmail() {
		return userEmail;
	}

	public User setUserEmail(String userEmail) {
		this.userEmail = userEmail;
		return this;
	}

	public String getHeadImage() {
		return headImage;
	}

	public User setHeadImage(String headImage) {
		this.headImage = headImage;
		return this;
	}

	public String getPassword() {
		return password;
	}

	public User setPassword(String password) {
		this.password = password;
		return this;
	}

	public Integer getStatus() {
		return status;
	}

	public User setStatus(Integer status) {
		this.status = status;
		return this;
	}

	public String getToken() {
		return token;
	}

	public User setToken(String token) {
		this.token = token;
		return this;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
